From 7a3dc27bc5d40f2abab494bcae494e49f37e0c68 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Tue, 3 May 2005 16:43:39 +0000 Subject: [PATCH] Little unsupported changes to make converting from one layer type to another more reliable/useful --- gpsbabel/an1.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gpsbabel/an1.c b/gpsbabel/an1.c index 9212a778d..63035f4c7 100644 --- a/gpsbabel/an1.c +++ b/gpsbabel/an1.c @@ -657,6 +657,36 @@ Write_One_AN1_Line( const route_head *rte ) if ( rte->an1_extras ) { rec = (an1_line_record *)(void *)(rte->an1_extras); local = 0; + switch (output_type_num) { + case 1: + if ( rec->type != 14 ) { + rec = Alloc_AN1_Line(); + memcpy( rec, rte->an1_extras, sizeof(an1_line_record)); + local = 1; + rec->magic = 4112; + rec->unk1 = 4359; + rec->unk2 = 655360; + rec->type = 14; + rec->unk8 = 2; + } // end if + break; + case 2: + if ( rec->type != 15 ) { + rec = Alloc_AN1_Line(); + memcpy( rec, rte->an1_extras, sizeof(an1_line_record)); + local = 1; + rec->type = 15; + } // end if + break; + case 4: + if ( rec->type != 16 ) { + rec = Alloc_AN1_Line(); + memcpy( rec, rte->an1_extras, sizeof(an1_line_record)); + local = 1; + rec->type = 16; + } // end if + break; + } } else { rec = Alloc_AN1_Line(); -- 2.30.2